﻿using Dapper;
using System;
using BCEntity.HelpDocument.HelpDocumentCategory;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.HelpDocument.HelpDocumentCategory
{
    /// <summary>
    /// 帮助文档类型
    /// </summary>
    public interface IHelpDocumentCategoryData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="helpDocumentCategoryId">帮助文档类型Id</param>
        Task<bool> Exists(long helpDocumentCategoryId);
        /// <summary>
        /// 增加帮助文档类型
        /// </summary>
        /// <param name="entity">帮助文档类型信息</param>
        Task<HelpDocumentCategoryEntity> Add(HelpDocumentCategoryEntity entity);
        /// <summary>
        /// 更新帮助文档类型
        /// </summary>
        /// <param name="entity">帮助文档类型信息</param>
        Task<HelpDocumentCategoryEntity> Update(HelpDocumentCategoryEntity entity);
        /// <summary>
        /// 删除帮助文档类型
        /// </summary>
        /// <param name="helpDocumentCategoryId">帮助文档类型Id</param>
        Task<bool> Delete(long helpDocumentCategoryId);
        /// <summary>
        /// 获取帮助文档类型
        /// </summary>
        /// <param name="helpDocumentCategoryId">帮助文档类型Id</param>
        Task<HelpDocumentCategoryEntity> GetEntity(long helpDocumentCategoryId);
        /// <summary>
        /// 获取帮助文档类型列表
        /// </summary>
        Task<IEnumerable<HelpDocumentCategoryEntity>> GetList();
        /// <summary>
        /// 获取帮助文档类型分页列表
        /// </summary>
        /// <param name="documentCategoryName">文档分类名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<HelpDocumentCategoryEntity>, int)> Query(string documentCategoryName, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}